/*
 * BinaryOperatorAst.h
 *
 *  Created on: 30 Oct 2010
 *      Author: kn308
 */

#ifndef BINARYOPERATORAST_H_
#define BINARYOPERATORAST_H_

#include <MAlice/Ast/OperatorAst.h>
#include <MAlice/Ast/ExpressionAst.h>


namespace MAlice
{

class BinaryOperatorAst: public OperatorAst
{
private:
	ExpressionAst* mLHS;
	ExpressionAst* mRHS;

protected:
	BinaryOperatorAst(const std::string& operatorName, ExpressionAst* lhs,
			ExpressionAst* rhs);

	void checkType(llvm::Value*& LHS, llvm::Value*& RHS);

public:
	virtual ~BinaryOperatorAst();

	inline ExpressionAst* getLHS()
	{
		return mLHS;
	}
	inline ExpressionAst* getRHS()
	{
		return mRHS;
	}
};

}

#endif /* BINARYOPERATORAST_H_ */
